[llvm-commits] [hlvm] r38228 - in /hlvm/trunk/hlvm: AST/Locator.cpp AST/Locator.h CodeGen/LLVMGenerator.cpp Reader/Reader.h Writer/Writer.h

Reid Spencer reid at x10sys.com
Sat Jul 7 17:01:23 PDT 2007


Author: reid
Date: Sat Jul  7 19:01:23 2007
New Revision: 38228

URL: http://llvm.org/viewvc/llvm-project?rev=38228&view=rev
Log:
Cleanup GCC 4.1.1 warnings about classes without virtual destructors.

Modified:
    hlvm/trunk/hlvm/AST/Locator.cpp
    hlvm/trunk/hlvm/AST/Locator.h
    hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp
    hlvm/trunk/hlvm/Reader/Reader.h
    hlvm/trunk/hlvm/Writer/Writer.h

Modified: hlvm/trunk/hlvm/AST/Locator.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Locator.cpp?rev=38228&r1=38227&r2=38228&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Locator.cpp (original)
+++ hlvm/trunk/hlvm/AST/Locator.cpp Sat Jul  7 19:01:23 2007
@@ -34,6 +34,12 @@
 namespace hlvm
 {
 
+Locator::~Locator() {}
+URILocator::~URILocator() {}
+LineLocator::~LineLocator() {}
+LineColumnLocator::~LineColumnLocator() {}
+RangeLocator::~RangeLocator() {}
+
 bool 
 URILocator::equals(const Locator& that) const
 {

Modified: hlvm/trunk/hlvm/AST/Locator.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Locator.h?rev=38228&r1=38227&r2=38228&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Locator.h (original)
+++ hlvm/trunk/hlvm/AST/Locator.h Sat Jul  7 19:01:23 2007
@@ -52,6 +52,7 @@
   /// @name Constructors
   protected:
     Locator() : SubclassID(0) {}
+    virtual ~Locator();
   /// @name Accessors
   /// @{
   public:
@@ -76,6 +77,7 @@
   /// @{
   public:
     URILocator(const URI* u) : Locator(), uri(u) { SubclassID = 1; }
+    virtual ~URILocator();
 
   /// @}
   /// @name Accessors
@@ -104,6 +106,7 @@
     LineLocator(const URI* u, uint32_t l) : URILocator(u), line(l) {
       SubclassID = 2; 
     }
+    virtual ~LineLocator();
 
   /// @}
   /// @name Accessors
@@ -130,6 +133,7 @@
   public:
     LineColumnLocator(const URI* u, uint32_t l, uint32_t c) 
       : LineLocator(u,l), col(c) { SubclassID = 3; }
+    virtual ~LineColumnLocator();
 
   /// @}
   /// @name Accessors
@@ -159,6 +163,7 @@
   public:
     RangeLocator(const URI* u, uint32_t l, uint32_t c, uint32_t l2, uint32_t c2)
       : LineColumnLocator(u,l,c), line2(l2), col2(c2) { SubclassID = 4; }
+    virtual ~RangeLocator();
 
   /// @}
   /// @name Accessors

Modified: hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp?rev=38228&r1=38227&r2=38228&view=diff

==============================================================================
--- hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp (original)
+++ hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp Sat Jul  7 19:01:23 2007
@@ -731,9 +731,9 @@
           // We have pointers to different element types. This *can* be okay if
           // we apply conversions.
           if (CElemType == llvm::Type::SByteTy) {
-            // The initializer is an sbyte*, which we can conver to either a
+            // The initializer is an sbyte*, which we can convert to either a
             // hlvm_text or an hlvm_buffer.
-            if (elemType = get_hlvm_buffer()) {
+            if (elemType == get_hlvm_buffer()) {
               // Assign the constant string to the buffer
             } else if (elemType == get_hlvm_text()) {
             }

Modified: hlvm/trunk/hlvm/Reader/Reader.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Reader/Reader.h?rev=38228&r1=38227&r2=38228&view=diff

==============================================================================
--- hlvm/trunk/hlvm/Reader/Reader.h (original)
+++ hlvm/trunk/hlvm/Reader/Reader.h Sat Jul  7 19:01:23 2007
@@ -37,6 +37,8 @@
 class Reader
 {
 public:
+  virtual ~Reader() {}
+
   /// This method reads the entire content of the reader's source.
   virtual void read() = 0;
 

Modified: hlvm/trunk/hlvm/Writer/Writer.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Writer/Writer.h?rev=38228&r1=38227&r2=38228&view=diff

==============================================================================
--- hlvm/trunk/hlvm/Writer/Writer.h (original)
+++ hlvm/trunk/hlvm/Writer/Writer.h Sat Jul  7 19:01:23 2007
@@ -37,6 +37,7 @@
 class Writer
 {
 public:
+  virtual ~Writer() {}
   /// This method writes the entire content of the AST to the writer's
   /// destination
   virtual void write(AST* source) = 0;





More information about the llvm-commits mailing list