llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Ian Anderson (ian-twilightcoder)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/139335.diff


1 Files Affected:

- (modified) clang/unittests/Frontend/SearchPathTest.cpp (+3-3) 


``````````diff
diff --git a/clang/unittests/Frontend/SearchPathTest.cpp 
b/clang/unittests/Frontend/SearchPathTest.cpp
index 5d382a4ee20a8..2ebe74d47eb02 100644
--- a/clang/unittests/Frontend/SearchPathTest.cpp
+++ b/clang/unittests/Frontend/SearchPathTest.cpp
@@ -51,6 +51,7 @@ class SearchPathTest : public ::testing::Test {
   FileManager FileMgr;
   SourceManager SourceMgr;
   std::unique_ptr<CompilerInvocation> Invocation;
+  IntrusiveRefCntPtr<TargetInfo> Target;
 
   void addDirectories(ArrayRef<StringRef> Dirs) {
     for (StringRef Dir : Dirs) {
@@ -65,10 +66,9 @@ class SearchPathTest : public ::testing::Test {
     CompilerInvocation::CreateFromArgs(*Invocation, Args, Diags);
     HeaderSearchOptions HSOpts = Invocation->getHeaderSearchOpts();
     LangOptions LangOpts = Invocation->getLangOpts();
-    TargetInfo *Target =
-        TargetInfo::CreateTargetInfo(Diags, Invocation->getTargetOpts());
+    Target = TargetInfo::CreateTargetInfo(Diags, Invocation->getTargetOpts());
     auto HeaderInfo = std::make_unique<HeaderSearch>(HSOpts, SourceMgr, Diags,
-                                                     LangOpts, Target);
+                                                     LangOpts, Target.get());
     ApplyHeaderSearchOptions(*HeaderInfo, HSOpts, LangOpts,
                              Target->getTriple());
     return HeaderInfo;

``````````

</details>


https://github.com/llvm/llvm-project/pull/139335
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to