[cfe-commits] r67527 - /cfe/trunk/lib/Basic/Targets.cpp

Daniel Dunbar daniel at zuster.org
Mon Mar 23 09:09:09 PDT 2009


Author: ddunbar
Date: Mon Mar 23 11:09:04 2009
New Revision: 67527

URL: http://llvm.org/viewvc/llvm-project?rev=67527&view=rev
Log:
Ad FreeBSD ARM target info.
 - Patch by Ed Schoeten!

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=67527&r1=67526&r2=67527&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Mar 23 11:09:04 2009
@@ -900,6 +900,19 @@
 } // end anonymous namespace.
 
 namespace {
+// arm FreeBSD target
+class FreeBSDARMTargetInfo : public ARMTargetInfo {
+public:
+  FreeBSDARMTargetInfo(const std::string& triple) : ARMTargetInfo(triple) {}
+  virtual void getTargetDefines(const LangOptions &Opts,
+                                std::vector<char> &Defines) const {
+    ARMTargetInfo::getTargetDefines(Opts, Defines);
+    getFreeBSDDefines(Opts, 0, getTargetTriple(), Defines);
+  }
+};
+} // end anonymous namespace
+
+namespace {
 class SparcV8TargetInfo : public TargetInfo {
   static const TargetInfo::GCCRegAlias GCCRegAliases[];
   static const char * const GCCRegNames[];
@@ -1092,6 +1105,8 @@
   if (T.find("armv6-") == 0 || T.find("arm-") == 0) {
     if (isDarwin)
       return new DarwinARMTargetInfo(T);
+    if (isFreeBSD)
+      return new FreeBSDARMTargetInfo(T);
     return new ARMTargetInfo(T);
   }
 





More information about the cfe-commits mailing list