diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-08-26 20:33:21 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-08-26 20:33:21 +0000 |
| commit | c3030bc285d90a139fb74629daadef5617283203 (patch) | |
| tree | fbc761413931170819d9ce15f564ddad107ee017 /lib/CodeGen/CGBlocks.cpp | |
| parent | 8d9f800669eabe9978f7698b0c0f37c380115fc0 (diff) | |
| download | clang-c3030bc285d90a139fb74629daadef5617283203.tar.gz clang-c3030bc285d90a139fb74629daadef5617283203.tar.bz2 clang-c3030bc285d90a139fb74629daadef5617283203.tar.xz | |
Simplify/clean up debug info suppression in CodeGenFunction
CodeGenFunction is run on only one function - a new object is made for
each new function. I would add an assertion/flag to this effect, but
there's an exception: ObjC properties involve emitting helper functions
that are all emitted by the same CodeGenFunction object, so such a check
is not possible/correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
| -rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index f200ec96e7..0db5a90bdc 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -1089,8 +1089,6 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, bool IsLambdaConversionToBlock) { const BlockDecl *blockDecl = blockInfo.getBlockDecl(); - // Check if we should generate debug info for this block function. - maybeInitializeDebugInfo(); CurGD = GD; BlockInfo = &blockInfo; @@ -1303,9 +1301,6 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { IdentifierInfo *II = &CGM.getContext().Idents.get("__copy_helper_block_"); - // Check if we should generate debug info for this block helper function. - maybeInitializeDebugInfo(); - FunctionDecl *FD = FunctionDecl::Create(C, C.getTranslationUnitDecl(), SourceLocation(), @@ -1478,9 +1473,6 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage, "__destroy_helper_block_", &CGM.getModule()); - // Check if we should generate debug info for this block destroy function. - maybeInitializeDebugInfo(); - IdentifierInfo *II = &CGM.getContext().Idents.get("__destroy_helper_block_"); @@ -1783,8 +1775,6 @@ generateByrefCopyHelper(CodeGenFunction &CGF, SC_Static, false, false); - // Initialize debug info if necessary. - CGF.maybeInitializeDebugInfo(); CGF.StartFunction(FD, R, Fn, FI, args, SourceLocation()); if (byrefInfo.needsCopy()) { @@ -1856,8 +1846,6 @@ generateByrefDisposeHelper(CodeGenFunction &CGF, SourceLocation(), II, R, 0, SC_Static, false, false); - // Initialize debug info if necessary. - CGF.maybeInitializeDebugInfo(); CGF.StartFunction(FD, R, Fn, FI, args, SourceLocation()); if (byrefInfo.needsDispose()) { |
