aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-07-07 21:03:28 +0000
committerCameron Zwarich <zwarich@apple.com>2011-07-07 21:03:28 +0000
commitdbd3c85825ad59896292ac7d326fe1985768f1e3 (patch)
treec09fd1617de32b93d9ecc0f248f54ff8902db356 /lib/CodeGen/CodeGenModule.cpp
parent2357aeec0da2740838963880edd97e43f14cb6fd (diff)
r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,
so roll it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index b2905299e4..ddef39726f 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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.");