From e44b45e7576afc6099703fa32d7574af607e7b6a Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 19 May 2007 14:44:42 +0000 Subject: [PATCH] Get the order of the hext digits right! llvm-svn: 37261 --- llvm/lib/VMCore/AsmWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index b205ccc4ab47..1d97d5c54f3f 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -195,12 +195,12 @@ static std::string QuoteNameIfNeeded(const std::string &Name) { } else { needsQuotes = true; result += "\\"; - char hex1 = C & 0x0F; + char hex1 = (C >> 4) & 0x0F; if (hex1 < 10) result += hex1 + '0'; else result += hex1 - 10 + 'A'; - char hex2 = (C >> 4) & 0x0F; + char hex2 = C & 0x0F; if (hex2 < 10) result += hex2 + '0'; else