If this should not happen, we should have an assert.
If it should happen, we should have a test and remove the comment.
In no case should we have this self inconsistent code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177399
91177308-0d34-0410-b5e6-
96231b3b80d8
CodeGen::CodeGenModule &CGM) const {
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);
if (!FD) return;
- llvm::Function *Fn = dyn_cast<llvm::Function>(GV);
- if (!Fn) return; // should not happen
+ llvm::Function *Fn = cast<llvm::Function>(GV);
if (FD->hasAttr<Mips16Attr>()) {
Fn->addFnAttr("mips16");
}