summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-11-12 00:01:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-11-12 00:01:12 +0000
commit851eec11a7075599d58e1924194767a3ebb50b02 (patch)
tree5b905af909629b6018f802e2720e8761741a79e5
parent4f02a0b74061b966ea1965adc0bf2aa053420551 (diff)
downloadbcm5719-llvm-851eec11a7075599d58e1924194767a3ebb50b02.tar.gz
bcm5719-llvm-851eec11a7075599d58e1924194767a3ebb50b02.zip
Disable generation of basic block names in NDEBUG mode.
Revert to enabling generation of instruction names when not in NDEBUG mode. llvm-svn: 59094
-rw-r--r--clang/lib/CodeGen/CGBuilder.h6
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBuilder.h b/clang/lib/CodeGen/CGBuilder.h
index 3f592954875..ed56bd91377 100644
--- a/clang/lib/CodeGen/CGBuilder.h
+++ b/clang/lib/CodeGen/CGBuilder.h
@@ -14,8 +14,12 @@
namespace clang {
namespace CodeGen {
- // Don't preserve names on values by default.
+ // Don't preserve names on values in an optimized build.
+#ifdef NDEBUG
typedef llvm::IRBuilder<false> CGBuilderTy;
+#else
+ typedef llvm::IRBuilder<> CGBuilderTy;
+#endif
} // end namespace CodeGen
} // end namespace clang
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 1b573700da1..38d9cf31d0e 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -222,7 +222,11 @@ public:
llvm::BasicBlock *createBasicBlock(const char *Name="",
llvm::Function *Parent=0,
llvm::BasicBlock *InsertBefore=0) {
+#ifdef NDEBUG
+ return llvm::BasicBlock::Create("", Parent, InsertBefore);
+#else
return llvm::BasicBlock::Create(Name, Parent, InsertBefore);
+#endif
}
/// getBasicBlockForLabel - Return the LLVM basicblock that the specified
OpenPOWER on IntegriCloud