aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-02 06:49:09 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-02 06:49:09 +0000
commit2968442603b029949246467253eeac8139a5b6d8 (patch)
treeff548e890078ba6293daa74c947dcdf57c410798 /lib/Frontend/CompilerInstance.cpp
parenta46e4d91d8f3eb341f2387768db66dcfe8dd0afa (diff)
Extend the source manager with the ability to override the contents of
files with the contents of an arbitrary memory buffer. Use this new functionality to drastically clean up the way in which we handle file truncation for code-completion: all of the truncation/completion logic is now encapsulated in the preprocessor where it belongs (<rdar://problem/7434737>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 1083d5ef1c..2d58beead8 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -287,7 +287,7 @@ CompilerInstance::createCodeCompletionConsumer(Preprocessor &PP,
}
// Truncate the named file at the given line/column.
- PP.getSourceManager().truncateFileAt(Entry, Line, Column);
+ PP.SetCodeCompletionPoint(Entry, Line, Column);
// Set up the creation routine for code-completion.
if (UseDebugPrinter)