Revert r177329.

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
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 193121b..556999f 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -4323,8 +4323,7 @@
                            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");
     }