-
- Downloads
[clang][NFC] Extract the EmitAssemblyHelper::TargetTriple member
Few times in different methods of the EmitAssemblyHelper class the following code snippet is used to get the TargetTriple and then use it's single method to check some conditions: TargetTriple(TheModule->getTargetTriple()) The parsing of a target triple string is not a trivial operation and it takes time to repeat the parsing many times in different methods of the class and even numerous times in one method just to call a getter (llvm::Triple(TheModule->getTargetTriple()).getVendor()), for example. The patch extracts the TargetTriple member of the EmitAssemblyHelper class to parse the triple only once in the class' constructor. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D122587
Please register or sign in to comment