diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-10-28 22:44:02 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-10-28 22:44:02 +0000 |
commit | 66aea7a58c98eeadbddd3dd852c8080c32f40cb0 (patch) | |
tree | 7151213ef7cd713b39f5ec27a5114c11e76bcd1e /llvm/lib/Transforms | |
parent | fc361b1d55893c836391d36a898e278d6402546a (diff) | |
download | bcm5719-llvm-66aea7a58c98eeadbddd3dd852c8080c32f40cb0.tar.gz bcm5719-llvm-66aea7a58c98eeadbddd3dd852c8080c32f40cb0.zip |
Make newlines be newlines! This should now work in both lli and native code.
llvm-svn: 1016
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/TraceValues.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp index 98589a457cb..66f381e4698 100644 --- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp @@ -31,7 +31,6 @@ #include <hash_set> #include <sstream> -const string PRINT_FUNC_NAME = "printVal"; static const char* PrintMethodNameForType(const Type* type) @@ -211,15 +210,15 @@ CreatePrintfInstr(Value* val, case Type::UIntTyID: case Type::ULongTyID: case Type::SByteTyID: case Type::ShortTyID: case Type::IntTyID: case Type::LongTyID: - fmtString << " %d\\n"; + fmtString << " %d\n"; break; case Type::FloatTyID: case Type::DoubleTyID: - fmtString << " %g\\n"; + fmtString << " %g\n"; break; case Type::PointerTyID: - fmtString << " %p\\n"; + fmtString << " %p\n"; break; default: @@ -302,7 +301,7 @@ InsertPrintInsts(Value *Val, BBI = BB->getInstList().insert(BBI, I)+1; // Print out a newline - fmtVal = GetStringRef(Mod, "\\n"); + fmtVal = GetStringRef(Mod, "\n"); I = new CallInst(GetPrintMethodForType(Mod, fmtVal->getType()), vector<Value*>(1, fmtVal)); BBI = BB->getInstList().insert(BBI, I)+1; @@ -396,7 +395,7 @@ CreateMethodTraceInst(Method* method, string fmtString(indent, ' '); ostringstream methodNameString; WriteAsOperand(methodNameString, method); - fmtString += msg + methodNameString.str() + "\\n"; + fmtString += msg + methodNameString.str() + '\n'; GlobalVariable *fmtVal = GetStringRef(method->getParent(), fmtString); Instruction *printInst = @@ -453,7 +452,6 @@ InsertTraceCode::doInsertTraceCode(Method *M, vector<BasicBlock*> exitBlocks; if (M->isExternal() || - (M->hasName() && M->getName() == PRINT_FUNC_NAME) || (! traceBasicBlockExits && ! traceMethodExits)) return false; |