diff options
author | Reid Kleckner <rnk@google.com> | 2019-12-22 12:54:06 -0800 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-12-22 12:54:06 -0800 |
commit | 891e25b02d760d0de18c7d46947913b3166047e7 (patch) | |
tree | f56319831a7d139cf4b8a395aa3eb4bb55e33eaf /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 79cc9e9b304a90598e8def4c8b5354d1f99186eb (diff) | |
download | bcm5719-llvm-891e25b02d760d0de18c7d46947913b3166047e7.tar.gz bcm5719-llvm-891e25b02d760d0de18c7d46947913b3166047e7.zip |
Revert "[DebugInfo] Support to emit debugInfo for extern variables"
This reverts commit d77ae1552fc21a9f3877f3ed7e13d631f517c825.
The tests committed along with this change do not pass, and should be
changed to use %clang_cc1.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 1fc2beb12ed..02b2dd35bc9 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3730,10 +3730,6 @@ void CodeGenModule::EmitTentativeDefinition(const VarDecl *D) { EmitGlobalVarDefinition(D); } -void CodeGenModule::EmitExternalDeclaration(const VarDecl *D) { - EmitExternalVarDeclaration(D); -} - CharUnits CodeGenModule::GetTargetTypeStoreSize(llvm::Type *Ty) const { return Context.toCharUnitsFromBits( getDataLayout().getTypeStoreSizeInBits(Ty)); @@ -4117,19 +4113,6 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, DI->EmitGlobalVariable(GV, D); } -void CodeGenModule::EmitExternalVarDeclaration(const VarDecl *D) { - if (CGDebugInfo *DI = getModuleDebugInfo()) - if (getCodeGenOpts().getDebugInfo() >= codegenoptions::LimitedDebugInfo) { - QualType ASTTy = D->getType(); - llvm::Type *Ty = getTypes().ConvertTypeForMem(D->getType()); - llvm::PointerType *PTy = - llvm::PointerType::get(Ty, getContext().getTargetAddressSpace(ASTTy)); - llvm::Constant *GV = GetOrCreateLLVMGlobal(D->getName(), PTy, D); - DI->EmitExternalVariable( - cast<llvm::GlobalVariable>(GV->stripPointerCasts()), D); - } -} - static bool isVarDeclStrongDefinition(const ASTContext &Context, CodeGenModule &CGM, const VarDecl *D, bool NoCommon) { |