[llvm-commits] [dragonegg] r150344 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Sun Feb 12 09:20:12 PST 2012
Author: baldrick
Date: Sun Feb 12 11:20:12 2012
New Revision: 150344
URL: http://llvm.org/viewvc/llvm-project?rev=150344&view=rev
Log:
Sink variable to where it is used.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=150344&r1=150343&r2=150344&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Sun Feb 12 11:20:12 2012
@@ -485,7 +485,6 @@
}
void TreeToLLVM::StartFunctionBody() {
- std::string Name = getLLVMAssemblerName(FnDecl);
// TODO: Add support for dropping the leading '\1' in order to support
// unsigned bswap(unsigned) __asm__("llvm.bswap");
// This would also require adjustments in make_decl_llvm.
@@ -523,6 +522,7 @@
// function. Set to current.
handleVisibility(FnDecl, Fn);
} else {
+ std::string Name = getLLVMAssemblerName(FnDecl);
Function *FnEntry = TheModule->getFunction(Name);
if (FnEntry) {
assert(FnEntry->getName() == Name && "Same entry, different name?");
More information about the llvm-commits
mailing list