https://llvm.org/bugs/show_bug.cgi?id=28185
Bug ID: 28185 Summary: CFI ICall metadata is generated incorrectly for functions with void parameter Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: d.c.d...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified When compiling the attached testcase with CFI ICall enabled, the metadata that is generated is incorrect: the callsite has metadata "_ZTSFivE", and the potential call target has metadata "_ZTSFiE". As a result, the LowerBitSets pass in LLVM does not realize that this is a potential valid call target. But, according to both the C and C++ specifications, functions with a single void parameter are equivalent to the same function with an empty parameter list. Unfortunately, I am not familiar enough with the Clang front-end to track down the source of the bug. However, the key difference is that when "CreateMetadataIdentifierForType(QualType(FnType, 0))" is called in "CodeGenFunction::EmitCall()", in one instance the "FnType" variable is of type "FunctionProtoType", whereas in the other instance it is of type "FunctionNoProtoType". Then, when the Itanium name mangler is called at "CXXNameMangler::mangleType()", the mangled name is represented differently. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs