Fix global variable code to correctly handle extern declarations.
When we have an "extern" global, now we no longer inadvertently define storage for it. Further, we now successfully do define storage when we encounter a definition following one or more extern declarations. Issues #215 and #217.
This commit is contained in:
2
sym.h
2
sym.h
@@ -75,7 +75,7 @@ public:
|
||||
std::string MangledName() const;
|
||||
|
||||
SourcePos pos; /*!< Source file position where the symbol was defined */
|
||||
const std::string name; /*!< Symbol's name */
|
||||
std::string name; /*!< Symbol's name */
|
||||
llvm::Value *storagePtr; /*!< For symbols with storage associated with
|
||||
them (i.e. variables but not functions),
|
||||
this member stores a pointer to its
|
||||
|
||||
Reference in New Issue
Block a user