[llvm-commits] [hlvm] r37989 - in /hlvm/trunk/hlvm/AST: Program.cpp Program.h
Reid Spencer
reid at x10sys.com
Sat Jul 7 16:58:43 PDT 2007
Author: reid
Date: Sat Jul 7 18:58:42 2007
New Revision: 37989
URL: http://llvm.org/viewvc/llvm-project?rev=37989&view=rev
Log:
A better way to initialize the Program signature.
Modified:
hlvm/trunk/hlvm/AST/Program.cpp
hlvm/trunk/hlvm/AST/Program.h
Modified: hlvm/trunk/hlvm/AST/Program.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Program.cpp?rev=37989&r1=37988&r2=37989&view=diff
==============================================================================
--- hlvm/trunk/hlvm/AST/Program.cpp (original)
+++ hlvm/trunk/hlvm/AST/Program.cpp Sat Jul 7 18:58:42 2007
@@ -27,7 +27,10 @@
namespace hlvm {
namespace AST {
-SignatureType Program::SignatureTy(0,"_hlvm_ProgramSignature");
-
+SignatureType* Program::initSignature() {
+ SignatureType* result = new SignatureType(0,"_hlvm_ProgramSignature");
+ return result;
+}
+SignatureType* Program::SignatureTy = Program::initSignature();
}}
Modified: hlvm/trunk/hlvm/AST/Program.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Program.h?rev=37989&r1=37988&r2=37989&view=diff
==============================================================================
--- hlvm/trunk/hlvm/AST/Program.h (original)
+++ hlvm/trunk/hlvm/AST/Program.h Sat Jul 7 18:58:42 2007
@@ -49,7 +49,7 @@
Program(
Node* parent, ///< The bundle in which the function is defined
const std::string& name ///< The name of the function
- ) : Function(&SignatureTy,parent,name,ProgramID) {}
+ ) : Function(SignatureTy,parent,name,ProgramID) {}
virtual ~Program();
/// @}
@@ -66,7 +66,8 @@
Block * block_; ///< The code block to be executed
SignatureType* signature_; ///< The function signature.
private:
- static SignatureType SignatureTy; ///< The signature for programs
+ static SignatureType* SignatureTy; ///< The signature for programs
+ static SignatureType* initSignature();
/// @}
};
} // AST
More information about the llvm-commits
mailing list