Skip to content

Commit d9cb70b

Browse files
committed
[clang] NFC: Remove CompilerInstance::getInvocationPtr
This member function was introduced in 0a92e09 ([clang][deps] Generate the full command-line for modules) in order to keep the CompilerInvocation object alive after CompilerInstance goes out of scope. However, d3fb4b9 ([clang][deps] NFC: Report modules' context hash) removes that use-case, making this function dead.
1 parent f6584b8 commit d9cb70b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/include/clang/Frontend/CompilerInstance.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,9 @@ class CompilerInstance : public ModuleLoader {
225225

226226
bool hasInvocation() const { return Invocation != nullptr; }
227227

228-
CompilerInvocation &getInvocation() { return *getInvocationPtr(); }
229-
230-
std::shared_ptr<CompilerInvocation> getInvocationPtr() {
228+
CompilerInvocation &getInvocation() {
231229
assert(Invocation && "Compiler instance has no invocation!");
232-
return Invocation;
230+
return *Invocation;
233231
}
234232

235233
/// setInvocation - Replace the current invocation.

0 commit comments

Comments
 (0)