summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-10-29 12:19:04 +0000
committerDuncan Sands <baldrick@free.fr>2012-10-29 12:19:04 +0000
commit2c7b44592f2db53805a51e497032c3c3db303091 (patch)
treee6f8668556adc22cca8e205ea3b1c3b41f1a1b91 /include/llvm
parent34739054ec9e192f38cd342bd75046f5227d0165 (diff)
downloadllvm-2c7b44592f2db53805a51e497032c3c3db303091.tar.gz
llvm-2c7b44592f2db53805a51e497032c3c3db303091.tar.bz2
llvm-2c7b44592f2db53805a51e497032c3c3db303091.tar.xz
Rather than duplicating the getPointerSize code just call getPointerSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/DataLayout.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/llvm/DataLayout.h b/include/llvm/DataLayout.h
index d778556684..dfacd9f32a 100644
--- a/include/llvm/DataLayout.h
+++ b/include/llvm/DataLayout.h
@@ -256,11 +256,7 @@ public:
}
/// Layout pointer size, in bits
unsigned getPointerSizeInBits(unsigned AS) const {
- DenseMap<unsigned, PointerAlignElem>::const_iterator val = Pointers.find(AS);
- if (val == Pointers.end()) {
- val = Pointers.find(0);
- }
- return 8*val->second.TypeBitWidth;
+ return getPointerSize(AS) * 8;
}
/// Layout pointer size, in bits, based on the type.
/// If this function is called with a pointer type, then