parameterize pointer size/align better without doing virtual method calls in normal case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50890 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index dd1fe64..e8fc923 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -23,6 +23,7 @@
TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
// Set defaults. These should be overridden by concrete targets as needed.
CharIsSigned = true;
+ PointerWidth = PointerAlign = 32;
WCharWidth = WCharAlign = 32;
IntWidth = IntAlign = 32;
LongWidth = LongAlign = 32;
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 25bc6fb..9c1675d 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -869,10 +869,8 @@
PIC16TargetInfo(const std::string& triple) : TargetInfo(triple) {
IntWidth = IntAlign = 16;
}
- virtual uint64_t getPointerWidth(unsigned AddrSpace) const { return 16; }
- virtual uint64_t getPointerAlign(unsigned AddrSpace) const { return 8; }
- virtual unsigned getIntWidth() const { return 16; }
- virtual unsigned getIntAlign() const { return 8; }
+ virtual uint64_t getPointerWidthV(unsigned AddrSpace) const { return 16; }
+ virtual uint64_t getPointerAlignV(unsigned AddrSpace) const { return 8; }
virtual void getTargetDefines(std::vector<char> &Defines) const {
Define(Defines, "__pic16");
}