diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
commit | bab175ec4b075c8076ba14c762900392533f6ee4 (patch) | |
tree | 01f4f29419a2cb10abe13c1e63cd2a66068b0137 /lib/Lex/PreprocessingRecord.cpp | |
parent | 8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff) |
Notes
Diffstat (limited to 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | lib/Lex/PreprocessingRecord.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 32e6de69f0db..13e15f3c943b 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/lib/Lex/PreprocessingRecord.cpp @@ -21,18 +21,13 @@ using namespace clang; ExternalPreprocessingRecordSource::~ExternalPreprocessingRecordSource() { } - InclusionDirective::InclusionDirective(PreprocessingRecord &PPRec, - InclusionKind Kind, - StringRef FileName, + InclusionKind Kind, StringRef FileName, bool InQuotes, bool ImportedModule, - const FileEntry *File, - SourceRange Range) - : PreprocessingDirective(InclusionDirectiveKind, Range), - InQuotes(InQuotes), Kind(Kind), ImportedModule(ImportedModule), File(File) -{ - char *Memory - = (char*)PPRec.Allocate(FileName.size() + 1, llvm::alignOf<char>()); + const FileEntry *File, SourceRange Range) + : PreprocessingDirective(InclusionDirectiveKind, Range), InQuotes(InQuotes), + Kind(Kind), ImportedModule(ImportedModule), File(File) { + char *Memory = (char *)PPRec.Allocate(FileName.size() + 1, alignof(char)); memcpy(Memory, FileName.data(), FileName.size()); Memory[FileName.size()] = 0; this->FileName = StringRef(Memory, FileName.size()); |