diff options
author | Ahmed Charles <ace2001ac@gmail.com> | 2012-02-13 06:30:56 +0000 |
---|---|---|
committer | Ahmed Charles <ace2001ac@gmail.com> | 2012-02-13 06:30:56 +0000 |
commit | 32e983e4fca666082f5be7bd662bff12b5d5b203 (patch) | |
tree | 624624b44b424a2ffaf8a2f715c66314ae260920 /llvm/lib/Transforms/Scalar/GlobalMerge.cpp | |
parent | 74650add0e84e09a6dd48642ab80a8feefdab7a8 (diff) | |
download | bcm5719-llvm-32e983e4fca666082f5be7bd662bff12b5d5b203.tar.gz bcm5719-llvm-32e983e4fca666082f5be7bd662bff12b5d5b203.zip |
Fix various issues (or do cleanups) found by enabling certain MSVC warnings.
- Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default.
- Remove misplaced llvm_unreachable.
- Add static to a declaration of a function on MSVC x86 only.
- Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable.
llvm-svn: 150364
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GlobalMerge.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GlobalMerge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/GlobalMerge.cpp b/llvm/lib/Transforms/Scalar/GlobalMerge.cpp index ad8689ab2bc..c2bd6e69ee1 100644 --- a/llvm/lib/Transforms/Scalar/GlobalMerge.cpp +++ b/llvm/lib/Transforms/Scalar/GlobalMerge.cpp @@ -193,8 +193,8 @@ bool GlobalMerge::doInitialization(Module &M) { continue; if (TD->getTypeAllocSize(Ty) < MaxOffset) { - const TargetLoweringObjectFile &TLOF = TLI->getObjFileLowering(); - if (TLOF.getKindForGlobal(I, TLI->getTargetMachine()).isBSSLocal()) + if (TargetLoweringObjectFile::getKindForGlobal(I, TLI->getTargetMachine()) + .isBSSLocal()) BSSGlobals.push_back(I); else if (I->isConstant()) ConstGlobals.push_back(I); |