[llvm-commits] [dragonegg] r95538 - /dragonegg/trunk/llvm-backend.cpp
Duncan Sands
baldrick at free.fr
Mon Feb 8 00:42:10 PST 2010
Author: baldrick
Date: Mon Feb 8 02:42:10 2010
New Revision: 95538
URL: http://llvm.org/viewvc/llvm-project?rev=95538&view=rev
Log:
Remove unused methods.
Modified:
dragonegg/trunk/llvm-backend.cpp
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95538&r1=95537&r2=95538&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Mon Feb 8 02:42:10 2010
@@ -1374,35 +1374,6 @@
return DECL_LLVM(decl); // Decl could have changed if it changed type.
}
-/// llvm_mark_decl_weak - Used by varasm.c, called when a decl is found to be
-/// weak, but it already had an llvm object created for it. This marks the LLVM
-/// object weak as well.
-void llvm_mark_decl_weak(tree decl) {
- assert(DECL_LLVM_SET_P(decl) && DECL_WEAK(decl) &&
- isa<GlobalValue>(DECL_LLVM(decl)) && "Decl isn't marked weak!");
- GlobalValue *GV = cast<GlobalValue>(DECL_LLVM(decl));
-
- // Do not mark something that is already known to be linkonce or internal.
- // The user may have explicitly asked for weak linkage - ignore flag_odr.
- if (GV->hasExternalLinkage()) {
- GlobalValue::LinkageTypes Linkage;
- if (GV->isDeclaration()) {
- Linkage = GlobalValue::ExternalWeakLinkage;
- } else {
- Linkage = GlobalValue::WeakAnyLinkage;
- // Allow loads from constants to be folded even if the constant has weak
- // linkage. Do this by giving the constant weak_odr linkage rather than
- // weak linkage. It is not clear whether this optimization is valid (see
- // gcc bug 36685), but mainline gcc chooses to do it, and fold may already
- // have done it, so we might as well join in with gusto.
- if (GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
- if (GVar->isConstant())
- Linkage = GlobalValue::WeakODRLinkage;
- }
- GV->setLinkage(Linkage);
- }
-}
-
/// register_ctor_dtor - Called to register static ctors/dtors with LLVM.
/// Fn is a 'void()' ctor/dtor function to be run, initprio is the init
/// priority, and isCtor indicates whether this is a ctor or dtor.
@@ -1410,16 +1381,6 @@
(isCtor ? &StaticCtors:&StaticDtors)->push_back(std::make_pair(Fn, InitPrio));
}
-/// llvm_emit_file_scope_asm - Emit the specified string as a file-scope inline
-/// asm block.
-void llvm_emit_file_scope_asm(const char *string) {
- if (TheModule->getModuleInlineAsm().empty())
- TheModule->setModuleInlineAsm(string);
- else
- TheModule->setModuleInlineAsm(TheModule->getModuleInlineAsm() + "\n" +
- string);
-}
-
//FIXME/// print_llvm - Print the specified LLVM chunk like an operand, called by
//FIXME/// print-tree.c for tree dumps.
//FIXMEvoid print_llvm(FILE *file, void *LLVM) {
More information about the llvm-commits
mailing list