diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-10 18:36:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-10 18:36:17 +0000 |
commit | c0a1eba0aba344728a07f17de6129169393fc97d (patch) | |
tree | 216dc2b61355d8ef2933a0f0425a43862b4748ba | |
parent | 59e44ff3d35daede1f2f6e705480e81907b69d56 (diff) | |
download | bcm5719-llvm-c0a1eba0aba344728a07f17de6129169393fc97d.tar.gz bcm5719-llvm-c0a1eba0aba344728a07f17de6129169393fc97d.zip |
Get rid of casts by #including the right header
llvm-svn: 24275
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 0ba39c22584..452cc0583ed 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -13,7 +13,7 @@ #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/Constants.h" -#include "llvm/Instruction.h" +#include "llvm/Module.h" #include "llvm/Support/Mangler.h" #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetMachine.h" @@ -31,7 +31,7 @@ bool AsmPrinter::doFinalization(Module &M) { void AsmPrinter::setupMachineFunction(MachineFunction &MF) { // What's my mangled name? - CurrentFnName = Mang->getValueName((Value*)MF.getFunction()); + CurrentFnName = Mang->getValueName(MF.getFunction()); } // emitAlignment - Emit an alignment directive to the specified power of two. @@ -69,15 +69,15 @@ void AsmPrinter::emitConstantValueOnly(const Constant *CV) { O << (uint64_t)CI->getValue(); else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV)) O << CI->getValue(); - else if (isa<GlobalValue>((Value*)CV)) { + else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) { // This is a constant address for a global variable or function. Use the // name of the variable or function as the address value, possibly // decorating it with GlobalVarAddrPrefix/Suffix or // FunctionAddrPrefix/Suffix (these all default to "" ) - if (isa<Function>((Value*)CV)) - O << FunctionAddrPrefix << Mang->getValueName(CV) << FunctionAddrSuffix; + if (isa<Function>(GV)) + O << FunctionAddrPrefix << Mang->getValueName(GV) << FunctionAddrSuffix; else - O << GlobalVarAddrPrefix << Mang->getValueName(CV) << GlobalVarAddrSuffix; + O << GlobalVarAddrPrefix << Mang->getValueName(GV) << GlobalVarAddrSuffix; } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) { const TargetData &TD = TM.getTargetData(); switch(CE->getOpcode()) { |