[cfe-commits] r59094 - in /cfe/trunk/lib/CodeGen: CGBuilder.h CodeGenFunction.h
Daniel Dunbar
daniel at zuster.org
Tue Nov 11 16:01:12 PST 2008
Author: ddunbar
Date: Tue Nov 11 18:01:12 2008
New Revision: 59094
URL: http://llvm.org/viewvc/llvm-project?rev=59094&view=rev
Log:
Disable generation of basic block names in NDEBUG mode.
Revert to enabling generation of instruction names when not in NDEBUG
mode.
Modified:
cfe/trunk/lib/CodeGen/CGBuilder.h
cfe/trunk/lib/CodeGen/CodeGenFunction.h
Modified: cfe/trunk/lib/CodeGen/CGBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuilder.h?rev=59094&r1=59093&r2=59094&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuilder.h (original)
+++ cfe/trunk/lib/CodeGen/CGBuilder.h Tue Nov 11 18:01:12 2008
@@ -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
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=59094&r1=59093&r2=59094&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Tue Nov 11 18:01:12 2008
@@ -222,7 +222,11 @@
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
More information about the cfe-commits
mailing list