arphaman marked an inline comment as done.
arphaman added inline comments.

================
Comment at: lib/Lex/PPMacroExpansion.cpp:1923
+              Tok, *this, diag::err_feature_check_malformed);
+          return II ? getTargetInfo().getTriple().getArchName().equals_lower(
+                          II->getName())
----------------
compnerd wrote:
> Hmm, the one thing to consider here is the canonicalized vs spelt target.  
> e.g. `armv7-windows` will map to `thumbv7-unknown-windows-msvc`.
I think it's ok to only allow "thumb" check to succeed instead of "arm", 
otherwise how would we differentiate between the two? However, we should take 
the sub arch into account, so when arch is "thumbv7", these checks should 
succeed:

```
__is_target_arch(thumb)
__is_target_arch(thumbv7)
```

but this one should fail:

```
__is_target_arch(thumbv6)
```

I fixed this in the updated patch.


Repository:
  rC Clang

https://reviews.llvm.org/D41087



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to