forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return a proper character array for 'define_static_string'.
This is somewhat tricky, since the character array needs to be associated to a declaration (i.e., a hidden variable), but the declaration won't be parsed and therefore won't get handed off to CodeGen. So unless we do something to tell CodeGen about the variable, it won't get emitted and we'll get linker errors. So we (for now, anyway) introduce a similar mechanism to what's already used for "#pragma weak"; we track any generated decl's in an array held by 'Sema', and pass those explicitly to CodeGen after parsing the AST. We also cache any such generated variables in the ASTContext, partly as an optimization, but mostly to ensure that each such variable obtains a (TU-)unique name. Closes issue llvm#80.
- Loading branch information
Showing
5 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters