diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-07-07 21:03:28 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-07-07 21:03:28 +0000 |
commit | be652e6a24069949e5a1fa06e7c68c5550fc23c3 (patch) | |
tree | 20b0242dbcdab3b807368dca837a4926e434da98 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 9f6f6f6ecc166ceec1958de71a7789bb4c819c5f (diff) | |
download | bcm5719-llvm-be652e6a24069949e5a1fa06e7c68c5550fc23c3.tar.gz bcm5719-llvm-be652e6a24069949e5a1fa06e7c68c5550fc23c3.zip |
r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,
so roll it out.
llvm-svn: 134638
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index b2905299e4a..ddef39726f7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -597,7 +597,7 @@ void CodeGenModule::EmitLLVMUsed() { void CodeGenModule::EmitDeferred() { // Emit code for any potentially referenced deferred decls. Since a // previously unused static decl may become used during the generation of code - // for a static function, iterate until no changes are made. + // for a static function, iterate until no changes are made. while (!DeferredDeclsToEmit.empty() || !DeferredVTables.empty()) { if (!DeferredVTables.empty()) { @@ -740,21 +740,8 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { } // Forward declarations are emitted lazily on first use. - if (!FD->doesThisDeclarationHaveABody()) { - if (!FD->doesDeclarationForceExternallyVisibleDefinition()) - return; - - const FunctionDecl *InlineDefinition = 0; - FD->getBody(InlineDefinition); - - llvm::StringRef MangledName = getMangledName(GD); - llvm::StringMap<GlobalDecl>::iterator DDI = - DeferredDecls.find(MangledName); - if (DDI != DeferredDecls.end()) - DeferredDecls.erase(DDI); - EmitGlobalDefinition(InlineDefinition); + if (!FD->doesThisDeclarationHaveABody()) return; - } } else { const VarDecl *VD = cast<VarDecl>(Global); assert(VD->isFileVarDecl() && "Cannot emit local var decl as global."); |