[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    [PATCH] D26164: [cfi] Fix missing !type annotation.
From:       Peter Collingbourne via cfe-commits <cfe-commits () lists ! llvm ! org>
Date:       2016-10-31 21:34:30
Message-ID: 964c45a17b0e58133ab848f1b4ad44b8 () localhost ! localdomain
[Download RAW message or body]

pcc added inline comments.


================
Comment at: lib/CodeGen/CodeGenModule.cpp:934
+  if (CodeGenOpts.SanitizeCfiCrossDso)
+    CreateFunctionTypeMetadata(dyn_cast<FunctionDecl>(D), F);
 }
----------------
It looks like we can get here with declarations that are not of type `FunctionDecl` \
(mostly via `SetInternalFunctionAttributes` -- see \
http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CodeGenModule.cpp/rSetInternalFunctionAttributes). \
I suppose that either means you would need to tolerate null pointers in \
`CreateFunctionTypeMetadata` or add an `isa` check here.

Please also add a test for one of those cases.


Repository:
  rL LLVM

https://reviews.llvm.org/D26164



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic