[cfe-commits] r38974 - /cfe/cfe/trunk/include/clang/Basic/TargetInfo.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:26:24 PDT 2007


Author: sabre
Date: Wed Jul 11 11:26:24 2007
New Revision: 38974

URL: http://llvm.org/viewvc/llvm-project?rev=38974&view=rev
Log:
Mark stuff const.

Modified:
    cfe/cfe/trunk/include/clang/Basic/TargetInfo.h

Modified: cfe/cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=38974&r1=38973&r2=38974&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/cfe/trunk/include/clang/Basic/TargetInfo.h Wed Jul 11 11:26:24 2007
@@ -32,17 +32,17 @@
 /// target, it will warn the first time the size of the 'long' datatype is
 /// queried.
 ///
-/// Note that TargetInfo does not take ownership of the various targets, but
-/// does expect them to be alive for as long as it is.
+/// Note that TargetInfo does not take ownership of the various targets or the 
+/// diagnostic info, but does expect them to be alive for as long as it is.
 ///
 class TargetInfo {
   /// Primary - This tracks the primary target in the target set.
   ///
-  TargetInfoImpl *PrimaryTarget;
+  const TargetInfoImpl *PrimaryTarget;
   
   /// SecondaryTargets - This tracks the set of secondary targets.
   ///
-  std::vector<TargetInfoImpl*> SecondaryTargets;
+  std::vector<const TargetInfoImpl*> SecondaryTargets;
   
   /// Diag - If non-null, this object is used to report the first use of
   /// non-portable functionality in the translation unit.
@@ -57,7 +57,7 @@
   unsigned WCharWidth;
   
 public:
-  TargetInfo(TargetInfoImpl *Primary, Diagnostic *D = 0) {
+  TargetInfo(const TargetInfoImpl *Primary, Diagnostic *D = 0) {
     PrimaryTarget = Primary;
     Diag = D;
     NonPortable = false;
@@ -79,7 +79,7 @@
   }
   
   /// AddSecondaryTarget - Add a secondary target to the target set.
-  void AddSecondaryTarget(TargetInfoImpl *Secondary) {
+  void AddSecondaryTarget(const TargetInfoImpl *Secondary) {
     SecondaryTargets.push_back(Secondary);
   }
   





More information about the cfe-commits mailing list