diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-03-05 18:54:05 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-03-05 18:54:05 +0000 |
| commit | 37e058783948f450f26dc863a694d28146a06d78 (patch) | |
| tree | c8ac9f121af67cc67e4e079c0ea8eee6aec25224 /clang/Basic | |
| parent | ae3429f5f1287cc953f5f4cafcc99b684e9f1e96 (diff) | |
| download | bcm5719-llvm-37e058783948f450f26dc863a694d28146a06d78.tar.gz bcm5719-llvm-37e058783948f450f26dc863a694d28146a06d78.zip | |
remove the source location arguments to various target query methods.
llvm-svn: 47954
Diffstat (limited to 'clang/Basic')
| -rw-r--r-- | clang/Basic/TargetInfo.cpp | 11 | ||||
| -rw-r--r-- | clang/Basic/Targets.cpp | 47 |
2 files changed, 4 insertions, 54 deletions
diff --git a/clang/Basic/TargetInfo.cpp b/clang/Basic/TargetInfo.cpp index 8701b38a0f1..1f0becee341 100644 --- a/clang/Basic/TargetInfo.cpp +++ b/clang/Basic/TargetInfo.cpp @@ -28,22 +28,19 @@ void TargetInfoImpl::ANCHOR() {} // out-of-line virtual method for class. // TargetInfoImpl. void TargetInfo::getFloatInfo(uint64_t &Size, unsigned &Align, - const llvm::fltSemantics *&Format, - FullSourceLoc Loc) { + const llvm::fltSemantics *&Format) { Align = 32; // FIXME: implement correctly. Size = 32; Format = &llvm::APFloat::IEEEsingle; } void TargetInfo::getDoubleInfo(uint64_t &Size, unsigned &Align, - const llvm::fltSemantics *&Format, - FullSourceLoc Loc) { + const llvm::fltSemantics *&Format) { Size = 64; // FIXME: implement correctly. Align = 32; Format = &llvm::APFloat::IEEEdouble; } void TargetInfo::getLongDoubleInfo(uint64_t &Size, unsigned &Align, - const llvm::fltSemantics *&Format, - FullSourceLoc Loc) { + const llvm::fltSemantics *&Format) { Size = Align = 64; // FIXME: implement correctly. Format = &llvm::APFloat::IEEEdouble; //Size = 80; Align = 32; // FIXME: implement correctly. @@ -74,7 +71,7 @@ void TargetInfo::getTargetDefines(std::vector<char> &Buffer) { /// ComputeWCharWidth - Determine the width of the wchar_t type for the primary /// target, diagnosing whether this is non-portable across the secondary /// targets. -void TargetInfo::ComputeWCharInfo(FullSourceLoc Loc) { +void TargetInfo::ComputeWCharInfo() { Target->getWCharInfo(WCharWidth, WCharAlign); } diff --git a/clang/Basic/Targets.cpp b/clang/Basic/Targets.cpp index d170fbefb65..89125b42ebc 100644 --- a/clang/Basic/Targets.cpp +++ b/clang/Basic/Targets.cpp @@ -722,50 +722,6 @@ public: } // end anonymous namespace. -namespace { -class LinuxTargetInfo : public DarwinTargetInfo { -public: - LinuxTargetInfo(const std::string& triple) : DarwinTargetInfo(triple) { - // Note: I have no idea if this is right, just for testing. - WCharWidth = 16; - WCharAlign = 16; - } - - virtual void getTargetDefines(std::vector<char> &Defines) const { - // TODO: linux-specific stuff. - getX86Defines(Defines, false); - } - virtual void getTargetBuiltins(const Builtin::Info *&Records, - unsigned &NumRecords) const { - X86::getBuiltins(Records, NumRecords); - } - virtual const char *getVAListDeclaration() const { - return getI386VAListDeclaration(); - } - virtual const char *getTargetPrefix() const { - return X86::getTargetPrefix(); - } - virtual void getGCCRegNames(const char * const *&Names, - unsigned &NumNames) const { - X86::getGCCRegNames(Names, NumNames); - } - virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, - unsigned &NumAliases) const { - X86::getGCCRegAliases(Aliases, NumAliases); - } - virtual bool validateAsmConstraint(char c, - TargetInfo::ConstraintInfo &info) const { - return X86::validateAsmConstraint(c, info); - } - virtual std::string convertConstraint(const char Constraint) const { - return X86::convertConstraint(Constraint); - } - virtual const char *getClobbers() const { - return X86::getClobbers(); - } -}; -} // end anonymous namespace. - //===----------------------------------------------------------------------===// // Driver code @@ -794,9 +750,6 @@ TargetInfo* TargetInfo::CreateTargetInfo(const std::string &T) { if (IsX86(T)) return new TargetInfo(new DarwinI386TargetInfo(T)); - if (T.find("bogusW16W16-") == 0) // For testing portability. - return new TargetInfo(new LinuxTargetInfo(T)); - return NULL; } |

