[PATCH] D134234: [llvm] Support forward-referenced globals with dso_local_equivalent

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 22:29:07 PDT 2022


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/AsmParser/LLParser.cpp:3459
+      GlobalValue *&FwdRef = ForwardRefDSOLocalEquivalents
+                                 .insert(std::make_pair(std::move(Fn), nullptr))
+                                 .first->second;
----------------
This may use `try_emplace` with structured bindings since we can use C++17. 


================
Comment at: llvm/test/CodeGen/X86/dso_local_equivalent_undefined_func.ll:1
+; RUN: not llc -mtriple=x86_64-linux-gnu -o - %s 2>&1 | FileCheck %s
+
----------------
Instead of having 3 test files, if merging improves readability, check out `split-file`. I think at the least the two invalid tests should be combined.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134234/new/

https://reviews.llvm.org/D134234



More information about the llvm-commits mailing list