[PATCH] Adding option -fno-inline-asm to disallow inline asm

Reid Kleckner rnk at google.com
Thu Jan 15 16:40:30 PST 2015


lgtm

Unlike -fno-ms-extensions, this doesn't make us blind to `__asm__` like we are for `__fastcall` & co. That seems OK.

Maybe this should this also affect asm register variables like this?

  int foo1 asm ("bar1");


================
Comment at: include/clang/Basic/LangOptions.def:117
@@ -116,2 +116,3 @@
 LANGOPT(NoMathBuiltin     , 1, 0, "disable math builtin functions")
+LANGOPT(NoGNUAsm          , 1, 0, "disable GNU-style inline assembly")
 
----------------
Let's invert this to GNUAsm and make it on by default.

http://reviews.llvm.org/D6870

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list