mnadeem marked 9 inline comments as done. mnadeem added inline comments.
================ Comment at: flang/lib/Frontend/CompilerInvocation.cpp:151 +static llvm::Reloc::Model getRelocationFromName(llvm::StringRef model) { + if (model.equals("static")) + return llvm::Reloc::Static; ---------------- MaskRay wrote: > awarzynski wrote: > > Only `-fpic` and `-fpie` are tested/supported right? Please, could you trim > > this accordingly? Or, alternatively, expand the test. > Prefer `==` to `equals` Using llvm::StringSwitch now ================ Comment at: flang/lib/Frontend/CompilerInvocation.cpp:151-162 + if (model.equals("static")) + return llvm::Reloc::Static; + if (model.equals("pic")) + return llvm::Reloc::PIC_; + if (model.equals("dynamic-no-pic")) + return llvm::Reloc::DynamicNoPIC; + if (model.equals("ropi")) ---------------- mnadeem wrote: > MaskRay wrote: > > awarzynski wrote: > > > Only `-fpic` and `-fpie` are tested/supported right? Please, could you > > > trim this accordingly? Or, alternatively, expand the test. > > Prefer `==` to `equals` > Using llvm::StringSwitch now Added more tests. ================ Comment at: flang/lib/Frontend/FrontendActions.cpp:532 + // Set PIC/PIE level LLVM module flags. + if (auto PICLevel = ci.getInvocation().getFrontendOpts().PICLevel) + llvmModule->setPICLevel(*PICLevel); ---------------- MaskRay wrote: > expand `auto` Changed the data type and logic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131533/new/ https://reviews.llvm.org/D131533 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits