aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-28 05:34:05 +0000
committerChris Lattner <sabre@nondot.org>2007-11-28 05:34:05 +0000
commit45e8cbdce25c2e16c7aac2036a591f6190097ae6 (patch)
tree305f3b00be1b424585a9e9d14830db2de61a7df4 /include/clang
parentdd1b516f2f5ed5953de1875afc2d04aa5a14d137 (diff)
Implement support for -fwritable-strings and make the code generator
merge string literals when it is not provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/LangOptions.h3
-rw-r--r--include/clang/CodeGen/ModuleBuilder.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index 05e7189ea5..d88dc4b9f9 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -36,12 +36,13 @@ struct LangOptions {
unsigned PascalStrings : 1; // Allow Pascal strings
unsigned Boolean : 1; // Allow bool/true/false
+ unsigned WritableStrings : 1; // Allow writable strings
LangOptions() {
Trigraphs = BCPLComment = DollarIdents = Digraphs = HexFloats = 0;
ObjC1 = ObjC2 = 0;
C99 = Microsoft = CPlusPlus = CPlusPlus0x = NoExtensions = 0;
- CXXOperatorNames = PascalStrings = Boolean = 0;
+ CXXOperatorNames = PascalStrings = Boolean = WritableStrings = 0;
}
};
diff --git a/include/clang/CodeGen/ModuleBuilder.h b/include/clang/CodeGen/ModuleBuilder.h
index 245dff43f0..9ca3648337 100644
--- a/include/clang/CodeGen/ModuleBuilder.h
+++ b/include/clang/CodeGen/ModuleBuilder.h
@@ -23,13 +23,14 @@ namespace clang {
class ASTContext;
class FunctionDecl;
class FileVarDecl;
+ struct LangOptions;
namespace CodeGen {
class CodeGenModule;
/// Init - Create an ModuleBuilder with the specified ASTContext.
- CodeGenModule *Init(ASTContext &Context, llvm::Module &M,
- const llvm::TargetData &TD);
+ CodeGenModule *Init(ASTContext &Context, const LangOptions &Features,
+ llvm::Module &M, const llvm::TargetData &TD);
/// CodeGenFunction - Convert the AST node for a FunctionDecl into LLVM.
///