[PATCH] D41334: [CodeExtractor] Use subset of function attributes for extracted function.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 12:07:33 PST 2018


efriedma added inline comments.


================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:636
+      switch (Attr.getKindAsEnum()) {
+      default:
+        continue;
----------------
Could we explicitly list out all the attributes here, so the compiler will warn if a new attribute gets added?


================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:644
+      case Attribute::MinSize:
+      case Attribute::Naked:
+      case Attribute::NoDuplicate:
----------------
Not sure about propagating JumpTable and Naked.  (Granted, we probably shouldn't be extracting code from Naked functions anyway.)


https://reviews.llvm.org/D41334





More information about the llvm-commits mailing list